home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4SPR006.TIP < prev    next >
Text File  |  1991-12-16  |  2KB  |  78 lines

  1. Typing `123 filename' at the DOS prompt, where filename is
  2. the name of a spreadsheet file, ought to cause 1-2-3 to
  3. bring up that spreadsheet automatically--but it doesn't. So,
  4. most users are forced to start 1-2-3 and then retrieve their
  5. files with the /FR command.
  6.  
  7. I use the batch file below, named L123.BAT, to start 1-2-3
  8. and automatically load the file I want to work on. If I type
  9. L123 filename (without the assumed WK3 extension), the file
  10. is loaded at once. If I don't type a file name, I get a
  11. blank worksheet.
  12.  
  13. This batch file assumes that 1-2-3 is in the C:\SLOTUS
  14. directory and that the data files are in a directory called
  15. C:\SLOTUS\SFILES. You should change the batch file to
  16. reflect your own choice of directories.
  17.  
  18. Mark Burgess
  19. St. Louis
  20.  
  21. Editor's note: Mr. Burgess's original batch file was
  22. intended for 1-2-3 Release 3; I've changed it to run with
  23. the more popular 2.x releases. The principle is the same,
  24. only the file extension changes. To use L123.BAT with
  25. Release 3, change every "WK1" to "WK3".
  26.  
  27. This batch file takes advantage of a very useful (and
  28. surpassingly obscure) feature of 1-2-3--the AUTO123 file. If
  29. there's a worksheet with this name in the default data
  30. directory, it's loaded automatically when 1-2-3 starts. By
  31. simply changing your file's name to AUTO123.WK1 before
  32. loading 1-2-3, and changing it back again after you exit,
  33. the batch file tricks the spreadsheet into loading your
  34. file. You can copy the listing below to a file using the
  35. Alt-F command, then modify it to suit your needs.
  36.  
  37. Postscript: After this tip was published, a few readers
  38. wrote to tell us that recent versions of 1-2-3 include an
  39. even simpler way to open a spreadsheet at startup. We
  40. haven't verified that it works with every version, but the
  41. command
  42.  
  43. 123 -wFilename
  44.  
  45. opens "Filename" automatically at startup under Release 2.2
  46. and Release 3.
  47.  
  48.  
  49. L123.BAT
  50.  
  51. ---- BEGIN LISTING ----
  52. @echo off
  53. c:
  54. if "%1"=="" goto nofile
  55. cd c:\lotus\files
  56. ren %1.wk1 auto123.wk1
  57. set filename=%1.wk1
  58. cd c:\lotus
  59. 123
  60. c:
  61. cd c:\lotus\files
  62. ren auto123.wk1 %filename%
  63. set filename=
  64. goto end
  65. :nofile
  66. cd c:\lotus
  67. 123
  68. :end
  69. echo on
  70. ---- END LISTING ----
  71.  
  72.  
  73. Title: Spread Out Your Spreadsheet Automatically
  74. Category: SPR
  75. Issue date: Nov 1991
  76. Editor: Brett Glass
  77. Supplementary files: NONE
  78.